package logic

import (
	"context"
	"gozero/models/mysql"

	"gozero/gozerorpc/gozerorpc"
	"gozero/gozerorpc/internal/svc"

	"github.com/zeromicro/go-zero/core/logx"
)

type GozeroListLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewGozeroListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GozeroListLogic {
	return &GozeroListLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

// 展示
func (l *GozeroListLogic) GozeroList(in *gozerorpc.GozeroListRequest) (*gozerorpc.GozeroListResponse, error) {
	// todo: add your logic here and delete this line

	var gozero mysql.GoZero
	mysql.DB.Debug().Where("id = ?", in.Id).Find(&gozero)

	return &gozerorpc.GozeroListResponse{}, nil
}
